package io.renren.modules.simida.service.impl;

import io.renren.common.utils.Constant;
import io.renren.datasource.annotation.DataSource;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.simida.dao.UserCertDao;
import io.renren.modules.simida.entity.UserCertEntity;
import io.renren.modules.simida.service.UserCertService;


@Service("userCertService")
public class UserCertServiceImpl extends ServiceImpl<UserCertDao, UserCertEntity> implements UserCertService {

    @Override
    @DataSource(Constant.DB_SLAVE_SIMIDA)
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<UserCertEntity> page = this.page(
                new Query<UserCertEntity>().getPage(params),
                new QueryWrapper<UserCertEntity>()
        );

        return new PageUtils(page);
    }

}